// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 岗位新增 POST /platform/post/add */
export async function add9(
  body: API.PostCreateDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/post/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 岗位所有 GET /platform/post/all */
export async function all5(options?: { [key: string]: any }) {
  return request<API.BaseResponseListPostVo>(`/barter-user/platform/post/all`, {
    method: "GET",
    ...(options || {}),
  });
}

/** 岗位删除 POST /platform/post/del */
export async function del5(body: API.IdDto, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/post/del`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 岗位详情 GET /platform/post/detail */
export async function detail11(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.detail11Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePostVo>(`/barter-user/platform/post/detail`, {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 岗位编辑 POST /platform/post/edit */
export async function edit11(
  body: API.PostUpdateDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/post/edit`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 岗位列表 GET /platform/post/list */
export async function listPage9(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPage9Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespPostVo>(
    `/barter-user/platform/post/list`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
